package com.zhuangxiaoyan.springboot.jpa.domian.repository;

import com.zhuangxiaoyan.springboot.jpa.domian.model.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

/**
 * UserRepository
 *
 * @author xjl
 * @version 2025/01/13 23:14
 **/
public interface UserRepository extends CrudRepository<User, Integer> {
    /**
     * 根据邮箱查询用户
     *
     * @param email
     * @return
     */
    Optional<User> findByEmail(String email);
}